#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
    int arr[11][11];
    int n = 0;
    arr[0][0] = 0;

    scanf("%d", &n);

    for (int i = 0; i < n; i++)
    {
        for (int k = 0; k < n - i - 1; k++)
        {
            printf(" ");
        }

        for (int j = 0; j <= i; j++)
        {
            if (i == j)
            {
                arr[i][j] = 1;
            }
            else if (j == 0)
            {
                arr[i][j] = 1;
            }
            else
            {
                arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
            }
            printf("%4d", arr[i][j]);
            if (i == j)
            {
                printf("\n");
            }
        }
    }
    return 0;
}

